<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <meta http-equiv="pragram" content="no-cache">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>登录</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link href="/Public/phone/css/swiper-3.0.8.css" rel="stylesheet" type="text/css">
    <link href="/Public/phone/css/iconfont.css" rel="stylesheet" type="text/css">
    <link href="/Public/phone/css/style.css" rel="stylesheet" type="text/css">
    <script src="/Public/phone/js/jquery-1.11.1.min.js"></script>
    <script src="/Public/layer/layer.js"></script>
    <script src="/Public/phone/js/swiper.min-3.1.0.js"></script>
</head>   
<body>
<div class="contain bg">
	<span class="middleSpan"></span>
	<div class="middleDiv">
		<div class="formList flexBox">
			<i class="iconfont icon-ren"></i>
			<input class="flexChild" id="name" type="text" placeholder="请输入用户名" />
		</div>
		<div class="formList flexBox">
			<i class="iconfont icon-lock"></i>
			<input class="flexChild" type="password" id="pass" placeholder="请输入密码" />
		</div>
		<button class="formList" onclick="save($('#name').val(),$('#pass').val())">登录</button>
	</div>
</div>
<script type="text/javascript">
	function save(name,pass){
		if(name==''){
			layer.msg("请输入用户名",{time:1500});
			return false;
		};
		if(pass==''){
			layer.msg("请输入密码",{time:1500});
			return false;
		}
		var data={"name":name,"pass":pass};
		$.ajax({
			type:"post",
			url:"<?php echo U('Login/login');?>",
			data:data,
			async:false,
			success:function(res){
				if(res.status==1){
					window.location.href="<?php echo U('Index/search');?>";
					return false;
				}
				layer.msg(res.info,{time:1500});
			}
		})
	};
</script>
</body>
</html>